<?php

use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class InitBankCard extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('bank_cards', function (Blueprint $table) {
            $table->comment = '提现银行卡';

            $table->increments('id');
            $table->uuid('uuid')->index(); 
            $table->integer('user_id')->unsigned()->index()->comment('用户id');

            $table->string('bank_name', 50)->nullable()->comment('银行名'); 
            $table->string('bank_account_number', 50)->nullable()->comment('银行卡号'); 
            $table->string('bank_account_name', 50)->nullable()->comment('银行卡用户名'); 

            $table->tinyInteger('status')->unsigned()->default(1)->index()->comment('状态 1为正常运行');

            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('bank_cards');
    }
}
